home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 1632 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  715 b 

  1. Path: news.cs.hope.edu!vnopstal
  2. From: vnopstal@cs.hope.edu (Michael Van Opstall)
  3. Newsgroups: comp.lang.c++
  4. Subject: [Q] Pointers to multi-D arrays
  5. Date: 12 Jan 1996 00:40:19 GMT
  6. Organization: Hope College
  7. Message-ID: <4d4alj$5o8@news.cs.hope.edu>
  8. NNTP-Posting-Host: smaug.cs.hope.edu
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11. How do you make a pointer to a multi dimensional array?
  12.  
  13. I have this:
  14.  
  15. Complex* data;
  16. // in the header
  17. ...
  18. // the constructor...
  19. data=new Complex[v][h];
  20.  
  21. and I get an error because it's trying to make an array of pointers to
  22. arrays of Complex instead of one pointer to a larger array.
  23.  
  24. TIA
  25. --
  26. Michael A. Van Opstall  --  vnopstal@cs.hope.edu
  27. http://www.cs.hope.edu/~vnopstal/deal.html - try it
  28.